console.log(1);
setTimeout(() => console.log(2))
Promise.resolve().then(() => console.log(3))
Promise.resolve().then(() => setTimeout(() => console.log(4)))
Promise.resolve().then(() => console.log(5))
setTimeout(() => console.log(6))
console.log(7);

// 1 7 3 5 2 6 4

// 调用栈 1 7
// 微任务队列 3  5
// 宏任务队列 2 6 